package com.lcx.plugin.neteaseCloud.component.toolwindow;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentFactory;
import com.lcx.plugin.neteaseCloud.music.DataCenter;
import org.jetbrains.annotations.NotNull;


/**
 * @author wengyongcheng
 * @since 2020/3/1 10:31 下午
 */
public class MusicToolWindowFactory implements ToolWindowFactory {

    /**
     * 创建 tool window
     *
     * @param project
     * @param toolWindow
     */
    @Override
    public void createToolWindowContent(@NotNull Project project, @NotNull ToolWindow toolWindow) {
        ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
        Content content = contentFactory.createContent(DataCenter.mainPanel.getContent(), "云音乐", false);
        toolWindow.getContentManager().addContent(content);

    }

}
